package com.jilian.mydemo.modul.exam.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;

import com.jilian.mydemo.MyApplication;
import com.jilian.mydemo.R;
import com.jilian.mydemo.base.BaseActivity;
import com.jilian.mydemo.modul.main.ui.WelcomeActivity;

public class StartExamActivity extends BaseActivity {
    private TextView tvContent;
    private TextView tvOk;
    private TextView tvStart;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        MyApplication.addActivity(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        MyApplication.removeActivity(this);
    }


    @Override
    protected void createViewModel() {

    }

    @Override
    public int intiLayout() {
        return R.layout.activity_startexam;
    }

    @Override
    public void initView() {
        setNormalTitle("开始考试", v -> finish());
        tvContent = (TextView) findViewById(R.id.tv_content);
        tvOk = (TextView) findViewById(R.id.tv_ok);
        tvStart = (TextView) findViewById(R.id.tv_start);
    }

    @Override
    public void initData() {
        MyApplication.clearSpecifyActivities(new Class[]{WelcomeActivity.class});
    }

    @Override
    public void initListener() {
        tvOk.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
            startActivity(new Intent(StartExamActivity.this,AnswerQuestionsActivity.class));
            }
        });
        tvStart.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(StartExamActivity.this,LearningManualActivity.class));


            }
        });
    }
}
